package com.dwxt.cdms.applets;

import com.dwxt.cdms.applets.service.EquipService;
import com.dwxt.common.base.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 小程序顾客新增并绑定设备
 * @className: EquipController
 * @author: yanlong
 * @createDate: 2021/05/10 17:31
 * @version: v1.0
 */
@RequestMapping("/cdms/equip")
@RestController
public class EquipController {

    @Autowired
    private EquipService equipService;


    /**
     * @param serialNumber 设备序列号
     * @param customerId   客户id
     * @param category     设备种类
     * @return
     */
    @RequestMapping("/bind")
    public BaseResult bind(String serialNumber, Integer customerId, String category,Integer managerId,String name) {
        return equipService.bind(serialNumber, customerId, category,managerId,name);
    }

    /**
     * 解绑调后台接口
     */

    /**
     * 查询用户的设备
     * @param customerId
     * @return
     */
    @RequestMapping("/selectByCustomerId")
    public BaseResult selectByCustomerId(Integer customerId){
        return equipService.selectByCustomerId(customerId);
    }

}
